package io.xccit.service.impl;

import io.xccit.dao.UserDao;
import io.xccit.dao.impl.UserDaoImpl;
import io.xccit.pojo.User;
import io.xccit.service.UserService;

/**
 * @author CH_ywx
 * @date 2023/9/30
 * @description 用户业务层
 */
public class UserServiceImpl implements UserService {

    private UserDao userDao = new UserDaoImpl();
    /**
     * 用户登录
     * @param user
     * @return
     */
    @Override
    public User login(User user) {
        return userDao.login(user);
    }

    /**
     * 账号可用性检查
     *
     * @param user
     * @return
     */
    @Override
    public User checkUser(User user) {
        return userDao.checkUser(user);
    }

    /**
     * 用户注册
     *
     * @param user
     * @return
     */
    @Override
    public int register(User user) {
        return userDao.register(user);
    }
}
